home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93a.txt / 000105_icon-group-sender _Thu Apr 1 12:23:04 1993.msg < prev    next >
Internet Message Format  |  1993-04-21  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 8 Apr 1993 13:39:30 MST
  2. Date: 1 Apr 93 12:23:04 GMT
  3. From: mcsun!news.funet.fi!uta!jere@uunet.uu.net  (Jere K{pyaho)
  4. Organization: University of Tampere, Finland
  5. Subject: Earn guru status - help an Icon rookie
  6. Message-Id: <9346@kielo.uta.fi>
  7. Sender: icon-group-request@cs.arizona.edu
  8. To: icon-group@cs.arizona.edu
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12.  
  13. Can I ask stupid questions in this newsgroup? Thanks.
  14.  
  15. Yesterday I started to learn Icon. Today I ran into a brick
  16. wall trying to solve Exercise 3.1 in "The Icon Programming
  17. Language" (2nd Ed.).
  18.  
  19. Now, I understand that this
  20.  
  21.     procedure genchar( s, c )
  22.         every i := ( s ? upto( c ) ) do
  23.             write ( i )
  24.     end
  25.  
  26. outputs the positions of every character of 'c' in 's'.
  27. But how do I output the corresponding _characters_ in 's'?
  28. I tried 'write(tab(i))', but nothing comes out. Am I missing
  29. something fundamental perhaps?
  30.  
  31. This is Icon v8.8 (interpreter), MS-DOS 5.0. I built it
  32. from the source using Borland C++ 3.1. Oh, incidentally,
  33. I'd like to build the compiler too, but the _TEXT segment
  34. is too large. Any solutions?
  35. -- 
  36. // Jere K{pyaho (jere@kielo.uta.fi)   |   Work is the curse of the
  37. // University of Tampere, Finland     |   drinking classes. -Oscar Wilde
  38.